package com.ocl.www.service;

import java.util.List;

import com.ocl.www.domain.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ocl.www.config.TargetDataSource;
import com.ocl.www.domain.UserAttention;
import com.ocl.www.mapper.UserAttentionMapper;

@Service
public class UserAttentionService {

	@Autowired
	public UserAttentionMapper userAttentionMapper;
	
	/**
	 * @Discription 添加用户兴趣
	 * @param userAttention
	 * @return
	 * @throws Exception
	 */
	public int insertUserAttention(List<UserAttention> list) throws Exception{
		
		int count = 0;
		
		
		count = userAttentionMapper.insertUserAttention(list);
	
		
		return count;
	}

    public List<UserAttention> queryAttentionOfUser(Integer userId)  throws Exception{

		List<UserAttention>  userAttentionList =  userAttentionMapper.queryAttentionOfUser(userId);

		return userAttentionList;
    }


}
